package com.hzlx.controller;

import com.hzlx.service.BusinessInfoService;
import com.hzlx.service.impl.BusinessInfoServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author 86166
 * @version 1.0
 * @description: TODO
 * @date 2023/4/10 16:25
 */
@WebServlet(urlPatterns = "/businessLogin.do")
public class BusinessLoginController extends HttpServlet {
    private static BusinessInfoService businessInfoService = new BusinessInfoServiceImpl();

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String url = businessInfoService.login(req, resp);
        req.getRequestDispatcher(url).forward(req,resp);
    }
}
